package WinterVacation.Day5;

public class Num1 {
    public static void main(String[] args) {
        for (int i = 0; i <= 1000; i++) {
            int j = divsm(i);
            if(i > j && i ==divsm(j)){
                System.out.println(i + "+" + j);
            }
        }
    }
    public static int divsm(int n){
        int sum = 0;
        for (int i = 1; i < n; i++) {
            if(n % i == 0){
                sum += i;
            }
        }
        return sum;
    }
}
